<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, maximum-scale=1,minimum-scale=1, user-scalable=no"
    />
    <title>使用第三方插件实现轮播图</title>
    <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="./css/common.css" type="text/css" />
    <!-- 1 引入资源 -->
    <link rel="stylesheet" href="./css/swiper-bundle.min.css" />
    <style>
      /* 3 设置轮播容器的大小 */
      .swiper {
        width: 300px;
        height: 150px;
        border: 1px solid black;
      }
      .swiper a {
        display: block;
        width: 100%;
        height: 100%;
      }
      .swiper a img {
        display: block;
        width: 100%;
        height: 100%;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <!-- 2 创建容器 -->
      <div class="swiper container">
        <div class="swiper-wrapper">
          <div class="swiper-slide">
            <a href="#">
              <img src="./img/1.png" alt="" />
            </a>
          </div>
          <div class="swiper-slide">
            <a href="#">
              <img src="./img/2.png" alt="" />
            </a>
          </div>
          <div class="swiper-slide">
            <a href="#">
              <img src="./img/3.png" alt="" />
            </a>
          </div>
          <div class="swiper-slide">
            <a href="#">
              <img src="./img/4.png" alt="" />
            </a>
          </div>
        </div>
        <!-- 如果需要分页器 -->
        <div class="swiper-pagination"></div>
      </div>
      <div class="swiper container1">
        <div class="swiper-wrapper">
          <div class="swiper-slide">
            <a href="#">
              <img src="./img/1.png" alt="" />
            </a>
          </div>
          <div class="swiper-slide">
            <a href="#">
              <img src="./img/2.png" alt="" />
            </a>
          </div>
          <div class="swiper-slide">
            <a href="#">
              <img src="./img/3.png" alt="" />
            </a>
          </div>
          <div class="swiper-slide">
            <a href="#">
              <img src="./img/4.png" alt="" />
            </a>
          </div>
        </div>
        <!-- 如果需要分页器 -->
        <div class="swiper-pagination"></div>
      </div>
    </div>
    <script src="./js/swiper-bundle.min.js"></script>
    <script src="./js/swiper-loop.js"></script>
  </body>
</html>
<!--
  1 引入资源
    <link rel="stylesheet" href="./css/swiper-bundle.min.css" />
    <script src="./js/swiper-bundle.min.js"></script>
  2 创建容器
  3 设置尺寸
  4 创建对象
  5 添加配置
 -->
